-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct the logic to return device count. #623
Conversation
@oleksandr-pavlyk I found what the issue was. The existing logic returned zero for a device type if no backend was specified. I fixed that. However, we need some good way of testing it n both C API and Python.
|
6066c64
to
ad6eabf
Compare
b63e01e
to
67c4993
Compare
Is the PR ready to graduate out of draft status? |
Need to add C API tests. Will do it later today. |
We were not handling the cases where a device identifier does not provide a backend or a device type. Changed the logic to count all devices of a given type if no backend is specified. Similarly, all devices in a backend are counted if no device type is provided.
67c4993
to
83a2b2f
Compare
83a2b2f
to
32a2425
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and CI agrees :)
We were not handling the cases where a device identifier
does not provide a backend or a device type. Changed the logic
to count all devices of a given type if no backend is specified.
Similarly, all devices in a backend are counted if no device
type is provided.
Fixes #601